package cn.wolfcode.crm.query;

import lombok.Getter;
import lombok.Setter;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.util.StringUtils;

import java.util.Date;

@Getter
@Setter
public class GatheringQueryObject extends QueryObject {
    private String keyword;
    private Long gradeId = -1L;

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date minTime;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date maxTime;

    public String getKeyword(){
        return StringUtils.hasLength(keyword) ? keyword : null;
    }
}
